﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Text;

namespace Medianamik.Tests.Common
{
    public static class Utilities
    {
        public static void RestoreDatabase(string cs)
        {
            var cn = new SqlConnection(ConfigurationManager.ConnectionStrings[cs].ToString());
            cn.Open();
            
            var cmd = new SqlCommand("exec master.dbo.RestoreTestDatabase 'mdkidx'", cn);
            cmd.CommandTimeout = 180;
            cmd.ExecuteNonQuery();
            cn.Close();
        }
    }
}
